package com.htdst.tasktracking.frontend;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import javax.annotation.PostConstruct;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;

import com.htdst.tasktracking.domain.Task;

@SessionScoped
@ManagedBean
public class MyTaskWebBean implements Serializable
{
	private static final long	serialVersionUID	= 5159159571106010389L;
	private List<Task>			tasks;

	@PostConstruct
	public void prepareMyTasks()
	{
		Task task = new Task();
		tasks = new ArrayList<Task>();
		task.setTitle("First Task.");
		tasks.add(task);
		task = new Task();
		task.setTitle("Second Task.");
		tasks.add(task);
		task = new Task();
		task.setTitle("Third Task.");
		tasks.add(task);
		task = new Task();
		task.setTitle("Fourth Task.");
		tasks.add(task);
	}

	public List<Task> getTasks()
	{
		return tasks;
	}

}
